import request from '@/utils/request'
import { baseUrl } from "@/utils/config";
// 登录
export const wxLogin = data => request('/wxLogin', 'post', data)

// 获取用户信息
export const getUserInfo = data => request('/getInfo', 'get', data)

// 获取手机号
export const getPhoneNum = data => request('/getWxphone', 'get', data)

//更新用户信息
export const updateUserInfo = data => request('/system/user/updateByOpenId', 'post', data)

//更新用户签名
export const updateUserSign = data => request('/system/user/updateUserSign', 'get', data)


//上传
export const upload = data => request('/common/upload', 'post', data)

//上传url
export const uploadUrl = baseUrl + '/common/upload'

// 根据部门获取辖区
export const getDeptByParent = data => request('/system/dept/getdeptByparent', 'get', data)

// 字典
export const getDict = data => request('/system/dict/data/listMobile', 'get', data)


// 9小列表
export const getStoreList = data => request('/system/store/listMobile', 'get', data)

// 9小检查记录
export const getStoreCheckList = data => request('/9xiaorecord/list', 'post', data)

// 9小检查记录 无细单
export const getStoreCheckList1 = (data, params) => request('/9xiaorecord/recordlist' + params, 'post', data)

// 9小检查记录共享
export const getStoreCheckListShare = (data) => request('/record/share/list', 'get', data)

// 新增9小检查记录
export const createStoreCheckList = data => request('/9xiaorecord/add', 'post', data)

// 修改9小检查记录
export const modifyStoreCheckList = data => request('/9xiaorecord/modify', 'post', data)

// 获取检查类型
export const getCheckType = data => request('/system/checktype/listMobile', 'post', data)

// 获取检查内容
export const getCheckInfoList = data => request('/system/checkinfo/listMobile', 'get', data)

// 根据检查记录ID获取详情
export const getrecordbyid = data => request('/9xiaorecord/getrecordbyid', 'get', data)

// 根据检查记录ID获取共享详情
export const getrecordbyidhare = data => request('/record/share/getrecordbyid', 'get', data)

// 删除照片
export const delphoto = data => request('/9xiaorecord/delphoto', 'get', data)


// 获取企业检查列表
export const getRecordCom = data => request('/busi/companyList', 'get', data)
// 获取场所检查列表
export const getRecordStore = data => request('/busi/xiaoList', 'get', data)

// 授权成功后提交openId
export const editifOpenId = data => request('/system/user/editifOpenId', 'get', data)